﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using KC.Enums.WorkFlow;
using KC.DTO.Core;
using System.Runtime.Serialization;

namespace KC.Service.DTO.WorkFlow
{
    [Serializable]
    [DataContract(IsReference = true)]
    public class WorkFlowsDto : EntityDTO
    {
        public WorkFlowsDto()
        {
            WorkFlowMembers = new List<WorkFlowMemberDto>();
            WorkFlowRules = new List<WorkFlowRuleDto>();
            IsEnable = true;
            StepType = StepType.Step;
        }
        [DataMember]
        public Guid? Id { get; set; }
        [DataMember]
        public string Title { get; set; }
        [DataMember]
        public Guid GroupId { get; set; } 
        [DataMember]
        public ActionType ActionType { get; set; }
        [DataMember]
        public Guid? ActionNode { get; set; }
        [DataMember]
        public string ActionNodeTitle { get; set; }
        [DataMember]
        public Guid? ThroughNode { get; set; }
        [DataMember]
        public string ThroughNodeTitle { get; set; }
        [DataMember]
        public StepType StepType { get; set; }
        [DataMember]
        public string StepTypeString {get;set;} 
        [DataMember]
        public string Remark { get; set; }
        [DataMember]
        public int Sort { get; set; }
        [DataMember]
        public ProcessingState ProcessingState { get; set; }
        [DataMember]
        public string ProcessingStateString { get; set; }

        [DataMember]
        public bool IsEnable { get; set; }
        [DataMember]
        public string UserNames { get; set; }

        [DataMember]
        public string UserIds { get; set; }

        [DataMember]
        public string RuleTitles { get; set; }

        public string RuleJsons { get; set; }

        public int ThroughCount { get; set; }

        [DataMember]
        public List<WorkFlowRuleDto> WorkFlowRules { get; set; }
        [DataMember]
        public List<WorkFlowMemberDto> WorkFlowMembers { get; set; }
    }
}
